#ifndef FIRSTWIDGET_H
#define FIRSTWIDGET_H

#include <QStackedWidget>
#include <QPushButton>
#include "SglDblWindow.h"
#include "LoginDialog.h"
#include "NetWindow.h"
#include <QTcpSocket>

extern const QString HOST;
extern const quint16 PORT;

class FirstWidget : public QStackedWidget
{
    Q_OBJECT

    QTcpSocket& mSocket;
    QPushButton mSglDblBtn;
    QPushButton mNetBtn;
    QPushButton mAboutBtn;
    LoginDialog mLoginDlg;
    QString username;
    QString pwd;
    NetWindow* w;

protected:
    //void closeEvent(QCloseEvent*);
public:
    explicit FirstWidget(QWidget *parent = 0);
    
signals:
    
protected slots:
    void readData();
    void disconnected();
    void onFirstBtnClicked();
    void onSecondBtnClicked();
    void onThirdBtnClicked();
    void Register();
    void Login();
};

#endif // FIRSTWIDGET_H
